package org.campuscontent.ui.multipanel;


public class UsersPanelManager
{
    // TODO:  select user panels!.
    /*
     *          MD:Mathematische Denotation
     *          TD:Tabelle Denotation
     *          Sprachsevaluation
     *          Uebungen ::  MultiGenericPanel
     */
    // TODO:  add suport to multi-language all templates
    
    private UsersPanelManager()
    {
        elements = new Entry[ INSTANCES ];
        
        for ( int i = 0; i < elements.length; i++ )
        {
            elements[ i ] = new Entry();
            elements[ i ].state = true;
        }
        
        MathematicNotation mdInstance = new MathematicNotation();
        MultiStylePanel    msInstance = new MultiStylePanel   ();
        TableNotation      tdInstance = new TableNotation     ();
        
        elements[ 0 ].instance = mdInstance;
        elements[ 1 ].instance = msInstance;
        elements[ 2 ].instance = tdInstance;
    }
    
    public static UsersPanelManager getInstance()
    {
        return self;
    }
    
    public Entry[] elements()
    {
        return elements;
    }
    
    private Entry[] elements;
    
    public class Entry
    {
        public boolean      state   ;
        public AbstractUnit instance;
        
        public String toString()
        {
            return "state:" + state + ", instance:" + instance; 
        }
    }

    public static final int INSTANCES = 3;
    
    private static final UsersPanelManager self = new UsersPanelManager();
}
